<template>
  <!-- 轮播视频 —— 定制版(一个位置) -->
  <div class="bannerVideo1">
    <div class="flex" :id="widgetData.siteId">
      <!-- 热力图 -->
      <template v-for="(ele,idx) in mapData">
        <div v-if="ele.sitePageId == widgetData.siteId" :key="idx+'a'" class="mark" 
          :style="{background:`#${ele.color}`,opacity:0.9}">
          <div>
            <div class="name">PV：{{ele.exposurePv}}</div>
            <div class="name">UV：{{ele.exposureUv}}</div>
          </div>
          <div class="level">Lv.{{ele.level}}</div>
        </div>
      </template>
      <!-- 视频框 -->
      <div class="video">
        <div class="image_null"></div>
      </div>
      <!-- 侧边栏 -->
      <div class="aside">
        <div class="items" v-for="(item,index) in widgetData.value" :key="index">
          <div class="title">{{item.title}}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "bannerVideo1",
  props: {
    type: {
      type: String,
      default: 'widget'
    },
    widgetData: {
      type: Object,
      required: true
    },
    // 热力图
    mapData:{
      type: Array,
      default: () => []
    }
  },
  data () {
    return {}
  },
  methods: {},
}
</script>

<style lang="less" scoped>
.bannerVideo1 {
  width: 100%;
  height: 100%;
  .flex{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    position: relative;
    // 热力图
    .mark{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      padding: 10px 15px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      .name{
        color: #ffffff;
      }
      .level{
        color: #ffffff;
        text-align: right;
      }
    }
  }
  .video{
    width: 73%;
    height: 100%;
    .image_null{
      background-color: #000000;
      width: 100%;
      height: 100%;
    }
  }
  .aside{
    width: 27%;
    height: 100%;
    border-left: 1px solid #cdcdcd;
    .items{
      background-color: #776c6c;
      font-size: 20px;
      width: 100%;
      height: 25%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 10px;
      border-bottom: 1px dashed #cdcdcd;
      &:nth-child(4){
        border-bottom: none;
      }
      .title{
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #fff;
      }
    }
    // 选中样式
    .Border{
      border: 2px dashed rgb(0, 255, 0) !important;
    }
  }
  // 锚点定位
  .anchor{
    box-shadow: 1px 1px 10px 10px red;
  }
}
</style>